public class Test2 {
    public static void main(String[] args) {
      String s1 = "0010" ;
      String s2 = "0000" ;
        System.out.println(solve(s1, s2));
    }

    public static String solve (String s, String t) {
        // write code here
        String str = new String() ;
        for(int i = s.length()-1 , jc = 1; i >= 0 ; i -- , jc*=10){
            StringBuilder strbu = new StringBuilder() ;
            int sum = 0 ;
            int tmp = 0 ;
            int n1 = s.charAt(i) - '0' ;
            for(int j = t.length() -1;j >=0  ; j--){
                int n2 = t.charAt(j)-'0';
                sum = (n1 * n2 + tmp) %10 ;
                tmp = (n1 * n2 + tmp)  / 10 ;
                    strbu.append(sum) ;
            }
            if(tmp != 0){
                strbu.append(tmp) ;
            }
            strbu.reverse();
            for(int j = 1 ; j < jc  ; j*= 10 ){
                strbu.append(0) ;
            }
            str = solve2(str , strbu.toString()) ;
        }
        int index = 0 ;
        for(int i = 0; i < str.length() ; i++){
            if(str.charAt(i) == '0'){
              index ++ ;
            }else {
                break;
            }
        }
        if(index == str.length()){
            return "0";
        }
        str = str.substring(index , str.length());
        return str ;
    }
    private  static String   solve2 (String s, String t) {
        if(s.length()==0 && t.length()==0){
            return "0";
        }
        if(s.length() == 0){
            return t ;
        }
        if(t.length() == 0){
            return s ;
        }
        // write code here
        StringBuilder strbu = new StringBuilder() ;
        int sLen = s.length()-1 ;
        int tLen = t.length()-1 ;
        int tmp = 0 ;
        while(sLen >= 0 && tLen >= 0){
            int s1 = s.charAt(sLen) - '0';
            int t1 = t.charAt(tLen) - '0';
            int sum = (s1+t1+tmp)%10 ;
            tmp = (s1+t1+tmp)/10 ;
            strbu.append(sum) ;
            sLen -- ;
            tLen -- ;
        }
        while(sLen >= 0){
            int s1 = s.charAt(sLen) - '0';
            int sum = (s1 + tmp) % 10 ;
            tmp = (s1+tmp) / 10 ;
            strbu.append(sum);
            sLen -- ;
        }
        while(tLen >= 0){
            int t1 = t.charAt(tLen) - '0';
            int sum = (t1 + tmp) % 10 ;
            tmp = (t1+tmp) / 10 ;
            strbu.append(sum);
            tLen -- ;
        }
        if(tmp == 1){
            strbu.append(1) ;
        }
        strbu.reverse() ;

        return strbu.toString();
    }
}
